<?php
include("./API.php");
include("../config.php");
tongji("qqgj");
$qq=$_GET["qq"];//需要评估的QQ号
$hh=$_GET["hh"]?:"\n";//换行符号(默认\n)
$url="http://www.qq-gg.net/index.php?m=Content&c=Index&a=pinggu";
$data='qq='.$qq;
$return_content=http_post_data($url, $data);
echo "".$web["ming"]."API♧QQ评估".$hh."";
echo "━━━━━━━━━".$hh."";
echo "估价号码：".$qq."".$hh."";
echo "号码估价：".GetBetween($return_content,'<span style="color:#FF9444">','</span>元</dd>')."元".$hh."";
echo "规律：".GetBetween($return_content,'<td colspan="2"><div class="notice_none"><h4>','</h4> </div></td>')."".$hh."";
echo "位数：".GetBetween($return_content,'<td colspan="2"><div class="notice_none"><h4> ','</h4></div></td>')."".$hh."";
echo "━━━━━━━━━".$hh."";
echo "Tips:".$web["ming"]."API技术支持";

function GetBetween($content,$start,$end){
$r = explode($start, $content);
if (isset($r[1])){
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
function http_post_data($url, $data_string) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
	curl_setopt($ch, CURLOPT_HTTPHEADER, array(
	"Content-Type: application/x-www-form-urlencoded",
		"Content-Length: " . strlen($data_string),
		"Cookie: "
		));
	ob_start();
	curl_exec($ch);
	$return_content = ob_get_contents();
	ob_end_clean();
	return $return_content;
}